function login(){
    var username = $("#username").val();
    var password = $("#password").val();
    $.ajax({
        url: '/login',
        method: 'post',
        datatype: 'json',
        data: {
            "username": username,
            "password": password
        },
        success: function(data) {
            if(data.status == "success"){
               confirm('登陆成功')
               window.location.href='/home'
               
            }else{
                confirm('账号或密码错误')
                window.location.href='/login'
            }
        },
        datatype: 'text'
    })
}